package de.koller.reason.gui.component.textfield;

import java.util.HashSet;
import java.util.Set;

public class TextFieldHandler {
	
	private final Set<RTextField> textfields = new HashSet<>();
	
	public void addTextField( RTextField tf ) {
		if( !textfields.add( tf ) )
			throw new IllegalArgumentException( "can't add textfield!" );
	}
	
	public void removeTextField( RTextField tf ) {
		if( !textfields.remove( tf ) )
			throw new IllegalArgumentException( "can't remove textfields!" );
	}
	
}
